# ==========================================
# 2024 EExuke. All Rights Reserved.
# ==========================================

DIR_SRC = .
DIR_OBJ = .

SRC = $(wildcard ${DIR_SRC}/*.c)
OBJ = $(patsubst %.c, ${DIR_OBJ}/%, $(notdir $(SRC)))

CC = gcc
LIB_CFLAGS += `pkg-config --cflags --libs gstreamer-1.0 gstreamer-pbutils-1.0 gtk+-3.0`

all: ${OBJ}
	$(warning Building ${OBJ} ...)

${DIR_OBJ}/%: ${DIR_SRC}/%.c
	$(warning Comping $< to $@ ...)
	@$(CC) $< -o $@ ${LIB_CFLAGS}


# Prevent naming conflicts such as the existence of a file named clean.
.PHONY: clean

clean:
	$(warning Clean $(OBJ) ...)
	@rm -rf $(OBJ)

